ADD_PARTITION_SQl='
ALTER TABLE jtp_gongdan_warehouse.ods_order_info ADD IF NOT EXISTS PARTITION (dt = '${data_date}');
ALTER TABLE jtp_gongdan_warehouse.ods_activity_info ADD IF NOT EXISTS PARTITION (dt = '${data_date}');
ALTER TABLE jtp_gongdan_warehouse.ods_send_detail ADD IF NOT EXISTS PARTITION (dt = '${data_date}');
ALTER TABLE jtp_gongdan_warehouse.ods_coupon_use ADD IF NOT EXISTS PARTITION (dt = '${data_date}');
'
/opt/module/spark/bin/beeline -u jdbc:hive2://node101:10001 -n bwie -e "${ADD_PARTITION_SQl}"